package com.dg11185.nearshop.net.response;

import org.json.JSONException;
import org.json.JSONObject;

public class AddCardResponse {
    public final static String SUCCESS = "SUCCESS";// 添加成功
    public final static String FAILE = "FAILE";// 调用失败
    public final static String ILLEGAL_PAR = "ILLEGAL_PAR";// 参数异常
    public final static String MEM_NOTFOUND = "MEM_NOTFOUND";// 会员不存在
    public final static String CARD_NOTFOUND = "CARD_NOTFOUND";// 卡不存在
    public final static String CARD_ILLEGALPWD = "CARD_ILLEGALPWD";// 卡密错误
    public final static String CARD_MAPPING = "CARD_MAPPING";// 卡已映射
    public final static String EXCEPTION = "EXCEPTION";// WS调用失败
    public final static String ILLEGAL_SIGN = "ILLEGAL_SIGN";// 签名无效
    public final static String CARD_INVALID = "CARD_INVALID";//卡已被锁定

    public String responseStr;
    public String status;

    public void parseJson(String response) throws JSONException {
        this.responseStr = response;
        JSONObject jsonObject = new JSONObject(response);
        status = jsonObject.getString("status");
    }

}
